home *** CD-ROM | disk | FTP | other *** search
/ Double-Click / Double Click - Issue 1 (Pentrisoft).adf / Mag1 / WhichProgLang.doc < prev   
Text File  |  1996-07-22  |  6KB  |  53 lines

  1. <H2><B>Which Programming Language?</B>
  2. <H3>
  3. If you want to learn to program, one of the difficult decisions is what language to learn. The importance of such a decision should not be underestimated, so read this article carefully!
  4.  
  5. <B>What Programming Languages are There?</B>
  6.  
  7. As far as Basics go, the main ones are AMOS, Blitz, Hisoft Basic, and GFA Basic. There's also Amiga Basic, which came with Amigas years ago (pre-Workbench 2), but it's pretty crap, really.
  8.  
  9. C appears in the form of Lattice C, Dice C (a shareware version is available), North C (Public Domain), and maybe some others that I don't know of. I heard of Storm C which is supposed to be coming out soon, or perhaps it has already?
  10.  
  11. Assembler is in the form of DevPac, and some others which I know exist, but I can't recall the names at the moment...
  12.  
  13. Other Languages? There are various forms of Pascal, as well as E (an Amiga only form of C), and even Logo, among others...
  14.  
  15. <B>Now I'm Totally Confused... Which One Should I Go For?</B>
  16.  
  17. It all depends on what you want to program, and how. The first thing to grasp is that programming languages are grouped into levels according to how easy or difficult they are to learn, with low level being the hardest, and high level being the easiest.
  18.  
  19. The lowest level form of programming is Machine Code. When a CPU runs a program, it receives its commands in the form of numbers, and in Machine Code, you enter a program with just numbers.
  20.  
  21. Of course, nobody does this nowadays! Instead, Assembly Language is used. You are still limited to the instructions that the CPU accepts, but instead of using numbers, each command is represented by a word (such as Move or Add). This makes things easy, but it is still very hard to program. The advantages are, however, that you have direct control over the CPU, so Assembly Programs tend to be very small and very fast compared to higher level language equivalents.
  22.  
  23. In general, you should go for Assembler if you are prepared for a challenge, and are particularly interested in writing games that require fast processing (arcade, Doom-clones, etc), or also Demos.
  24.  
  25. Next up the list are languages like C. Here, you are given a set of instructions which you program, and these are then converted into the ones the CPU can use and understand (see later). The advantages are that they are easier to program, but programs are less efficient. C is particularly the choice for application software.
  26.  
  27. The most common high level language is of course Basic. The most popular Basics on the Amiga are AMOS and Blitz, which I shall consider together first. AMOS is now in its Professional version, after appearing in its original and EasyAMOS form. Blitz is currently version two. Both have advantages over each other; Blitz is faster than AMOS, and so better for arcade games. Also, Blitz supports AGA, and can run under Intuition (this means you can open screens and windows under Workbench, rather than using its own 'custom' screen system), this makes it in theory better for applications. Unfortunately, the future of AMOS is currently uncertain, but there are add-ons allowing Intuition/AGA support (IntOS, and AMOSPro OS Dev Kit). One advantage of AMOS is that it is generally considered easier to use. It's difficult to say which is best, as I've only used AMOS, and it's probably just a matter of tastes.
  28.  
  29. As for HiSoft Basic, I believe it offers some quite powerful support for Intuition, but has the major disadvantage of being fairly difficult to use; it has been said that you'd be better of learning something like C. I don't know anything about GFA Basic; I would recommend anyone wishing to learn Basic to start on AMOS or Blitz.
  30.  
  31. Note that there are 'Program creation' packages, which may be considered 'super-high level languages'. Examples are CanDo and Game Engine, and they allow you to create programs easily, using just the mouse, and mayb just a few bits of code. The disadvantage is that they are limited in what they can do, and what sort of program they can produce.
  32.  
  33. <B>What are Compilers, Interpreters and Assemblers?</B>
  34.  
  35. Right, remember I said that only Machine Code could be accepted by the CPU direct, and if you use Assembly Language, each of these CPU instructions is represented by a word. To get Assembly programs to run, you must convert them into these numbers, and this is done by a program called an Assembler (such as DevPac). These Assemblers usually allow you to enter the code too, rather than using a separate text editor.
  36.  
  37. For all other types of languages, each instruction could be represented by one, or several basic CPU instructions, so the translation from instructions to numbers is more complicated. There are two ways of doing this; in real time (ie, while the program is running), this is done using an interpreter; or converted beforehand, using a Compiler.
  38.  
  39. Note that compiling is the only option for languages such as C. Often with Basics, you use an interpreter, but then run the program through a compiler to produce a finished version.
  40.  
  41. Compiling takes time, but the programs run quicker, and are stand-alone (ie, don't require the interpreter to run them).
  42.  
  43. <B>What About Converting Programs to Different Platforms?</B>
  44.  
  45. If you wish your program to be converted to another platform, it is usually better to use a lower level language. C is often very good for this, where as Basics are not.
  46.  
  47. As far as assembly is concerned, it depends on what CPUs the computers are using. At the moment, Amigas use the Motorola 68000 series of CPUs, so Amiga Assembler is based around this. Converting to the older Macs which also use these CPUs would not be too difficult (relatively speaking; you'd still need to do things differently regarding the graphics, operating system, etc). PowerMacs use PowerPCs, which may become available on Amigas very shortly; PCs use the Intel 8086 series.
  48.  
  49. From what I know, C is the best language for porting to other formats, as the language is more or less exactly the same on different computers, and by using special libraries, you don't need to worry about the differences between CPUs, graphics and operating systems.
  50.  
  51. <B>If you </B>are learning to program, you might like to join
  52. <A HREF="PentriMenu">PentriSoft</A>, the Shareware/Freeware Programmers' group, to make contacts with programmers of the same language.
  53.